using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;using THSERP.BusinessEntities;using THSERP.BaseProvider;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using THSLib;using THSERP.BaseProvider;

namespace THSERP.Modules.CompanyConstant
{
    public partial class guiConfigContactType : THSERPScreen
    {
        DataTable tblConfigContactType = new DataTable();
        public guiConfigContactType()
        {
            InitializeComponent();
        }

        private void guiConfigContactType_Load(object sender, EventArgs e)
        {
            tblConfigContactType = ADConfigValueUtility.glbdsConfigValues.Tables[ADConfigValueUtility.ADConfigValueContactType];
            fld_dgcContactType.DataSource = tblConfigContactType;
        }

#if never
        public void SaveConfigContactType()
        {
            foreach (DataRow rowContactType in tblConfigContactType.Rows)
            {
                String strContactTypeValue = rowContactType["Text"].ToString();
                String strADConfigValueColumnName = ADConfigValueUtility.ADConfigValueColumnPrefix + ADConfigValueUtility.ADConfigValueContactType + rowContactType["Value"].ToString();
                if(!String.IsNullOrEmpty(strContactTypeValue))
                    ADConfigValueUtility.ChangeTableADConfigValue(strADConfigValueColumnName, strContactTypeValue);
            }
        }
#endif
        private void fld_btnSave_Click(object sender, EventArgs e)
        {
            //SaveConfigContactType();
            MessageBox.Show("Gespeichert", "#Message#");
        }

        private void fld_btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }


    }
}